#ifndef VIDEOWIDGET_H
#define VIDEOWIDGET_H
#include <QMainWindow>

#include <QWidget>
#include "camerathread.h"

class VideoWidget : public QWidget
{
    Q_OBJECT
public:
    explicit VideoWidget(QWidget *parent = nullptr);
    VideoWidget( AVFormatContext *fmt_ctx);


    QImage currentFrame;
    QImage suspendFrame;


    AVFormatContext *fmt_ctx;
    bool isSuspend ;
    cameraThread* camera_decoder;


public:
    void startPaint( void);
    void stopPaint( void );
    void handleNewFrame(QImage img);
    void paintEvent(QPaintEvent *) override ;

signals:
};

#endif // VIDEOWIDGET_H
